package org.springframework.web.servlet.mvc.method.annotation;

import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyAdviceChain;
import org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor;

import java.util.List;

public class SimpleRequestResponseBodyMethodProcessor extends RequestResponseBodyMethodProcessor {
    private RequestResponseBodyAdviceChain advice;

    public SimpleRequestResponseBodyMethodProcessor(List<HttpMessageConverter<?>> converters) {
        super(converters);
    }

    @Override
    protected RequestResponseBodyAdviceChain getAdvice() {
        if (advice == null) {
            advice = new org.springframework.web.servlet.mvc.method.annotation.SimpleRequestResponseBodyAdviceChain(null);
        }
        return advice;
    }
}
